
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom'
import { createBrowserRouter } from 'react-router-dom';
import Login from './views/user/Login';
import Home from './views/home/Home';
import LayoutMain from './views/Layout/index';
import NotFound from './views/404/index';
import ArticleManage from './views/ArticleManage/index';
import ArticleList from './views/Article_list/index';
import OcrList from './views/ocr_list/index';
const AppRouter = createBrowserRouter([
    {
        path: '/',
        element: <LayoutMain/>,
        children: [{
            path: 'home',
            index: true,
            element: <Home/>,
            // element:  <Navigate to='/main/ArticleList' />
        }, {
            path: 'articleList',
            index: true,
            element: <ArticleList/>,
        }, {
            path: 'articleManage',
            index: true,
            element: <ArticleManage/>,
        }, {
            path: 'ocrList',
            index: true,
            element: <OcrList/>,
        }, ]
    },
    {
        path: 'login',
        element: <Login/>
    },
    {
        path: '*',
        element: <NotFound/>
    }
    
])
export default AppRouter;